<template>
	<view class="main column_c">
		<u-navbar title="影像详情" :placeholder="true" @rightClick="rightClick" :autoBack="true"></u-navbar>

		<view class="column-wrap ">
			<view class="col-item" v-for="(item, index) in dataInfo" :key="index">
				<image class="yyjl" :src="item"></image>
			</view>
		</view>

		<!-- <view class="ttbb" @click="toUrl('/pages/patient/video-upload ')">
			<image class="tj" src="/static/images/tj.png"></image>
		</view> -->



	</view>
</template>

<script>
	import api_silhouette from '@/api/silhouette.js';
	export default {
		async onLoad(option) {
			this.user = option.id;
		},
		async onShow() {
			this.access_token = uni.getStorageSync('access_token');
			if (!this.access_token) {
				uni.navigateTo({
					url: '/pages/auth/login'
				});
			} else {
				this.getScreenageDetailFuc(); // 查看影像详情
			}
		},
		data() {
			return {
				dataInfo: null,
				access_token: null,
			};
		},
		methods: {

			//查看影像详情
			async getScreenageDetailFuc() {
				var per = {
					medical_record: this.user,

				}
				const res = await api_silhouette.getScreenageDetail(per);
				if (res.code == 1) {
					this.dataInfo = res.data.list
				} else {
					this.$util.msg(res.message);
					return;
				}
			},

			toUrl(url) {
				this.navTo(url);
			},
		}
	};
</script>

<style scoped>
	.main {
		width: 100%;
		height: 100vh;

		background: #FAFAFA;



	}

	.top {
		padding: 32rpx;

	}



	::v-deep .u-tabs__wrapper__nav__item {
		padding: 18rpx !important;
	}





	.yyjl {
		height: 160rpx;
		width: 330rpx;
	}

	.wzz {
		font-weight: 400;
		font-size: 28rpx;
		color: #3D3D3D;
		margin-top: 16rpx;
	}




	.column-wrap {
		width: 100%;
		overflow: hidden;
		/* 清除浮动影响 */
		margin-left: 45rpx;
		margin-top: 30rpx;
	}

	.col-item {
		float: left;
		width: 48%;
		/* 每个 item 占据 48%，留 2% 的间隔 */
		margin-right: 2%;
		margin-bottom: 10px;
		box-sizing: border-box;
		margin-bottom: 30rpx;
	}

	.col-item:nth-child(2n) {
		margin-right: 0;
		/* 保证每行最后一项没有多余的间隔 */
	}

	.tj {
		width: 166rpx;
		height: 168rpx;
	}

	.ttbb {
		position: fixed;
		bottom: 100rpx;
		right: 20rpx;
	}
</style>